package wordy;

import java.util.Scanner;

public class testWordy {
	public static void main(String[] args) {

		newWordy nw = new newWordy();

		Scanner sc = new Scanner(System.in);

		String str = sc.nextLine();

		int i = Integer.parseInt(str);

		// System.out.println("This is the size of the string array ::" + i);

		String str_array = sc.nextLine();
		String[] str_arr = new String[i];
		Scanner sc1 = new Scanner(str_array);
		while (sc1.hasNext()) {

			for (int j = 0; j < str_arr.length; j++) {

				str_arr[j] = sc1.next();

			}

		}

		// System.out.println("This is the content of the string array ::"
		// + str_array);
		String str3 = sc.nextLine();
		// System.out.println("This is the size of the char array ::"
		// +str3 );

		String str2 = sc.nextLine();

		// System.out.println("This is the content of the char array ::"
		// + str2);

		nw.printArray(str_arr);

		nw.findWords(str_arr, str2);

	}

}
